#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int k, coin = 0, day = 0;
    cin >> k;
    int i = 1;
    while (1)
    {
        for (int j = 1; j <= i; j++)
        {
            if (day >= k)
            {
                cout << coin;
                return 0;
            }
            else
            {
                coin += i;
                day++;
            }
        }
        i++;
    }
}